/*
 * AC
 * DP
 **/
#include <stdio.h>
#include <string.h>

/*int w(int a, int b, int c);*/
int t[100][100][100];

int main(int argc, char **argv)
{
	int a, b, c;
	int i, j, k;

	for (i = 0; i < 21; i++)
		for (j = 0; j < 21; j++)
			t[0][i][j] = t[i][0][j] = t[i][j][0] = 1;
	for (i = 1; i < 21; i++)
		for (j = 1; j < 21; j++)
			for (k = 1; k < 21; k++) {
				if (i < j && j < k)
					t[i][j][k] = t[i][j][k-1] + t[i][j-1][k-1] - t[i][j-1][k];
				else t[i][j][k] = t[i-1][j][k] + t[i-1][j-1][k] + t[i-1][j][k-1] - t[i-1][j-1][k-1];
			}
	while (1) {
		scanf("%d %d %d", &a, &b, &c);
		if (a == -1 && b == -1 && c == -1)
			break;

		i = a;j = b;k = c;
		if (a > 20 || b > 20 || c > 20)
			i = j = k = 20;
		if (a <=0 || b <= 0 || c <= 0)
			i = j = k = 0;
		printf("w(%d, %d, %d) = %d\n", a, b, c, t[i][j][k]);
	}
	return 0;
}

/*
int w(int a, int b, int c)
{
	if (a > 20 || b > 20 || c > 20) {
		if (t[20][20][20])
			return t[20][20][20];
		return t[20][20][20] = w(20, 20, 20);
	}
	if (a <= 0 || b <= 0 || c <= 0) {
		t[a][b][c] = 1;
		return 1;
	}
	if (a < b && b < c) {
		if (t[a][b][c - 1]) {
			if (t[a][b - 1][c - 1]) {
				if (t[a][b - 1][c])
					return t[a][b][c] = t[a][b][c - 1] + t[a][b - 1][c - 1] - t[a][b - 1][c];
				else return t[a][b][c] = t[a][b][c - 1] + t[a][b - 1][c - 1] - w(a, b - 1, c);
			}
			else {
				if (t[a][b - 1][c])
					return t[a][b][c] = t[a][b][c - 1] + w(a, b - 1, c - 1) - t[a][b - 1][c];
				else return t[a][b][c] = t[a][b][c - 1] + w(a, b - 1, c - 1) - w(a, b - 1, c);
			}
		}
		else {
			if (t[a][b - 1][c - 1]) {
				if (t[a][b - 1][c])
					return t[a][b][c] = w(a, b, c - 1) + t[a][b - 1][c - 1] - t[a][b - 1][c];
				else return t[a][b][c] = w(a, b, c - 1) + t[a][b - 1][c - 1] - w(a, b - 1, c);
			}
			else {
				if (t[a][b - 1][c])
					return t[a][b][c] = w(a, b, c - 1) + w(a, b - 1, c - 1) - t[a][b - 1][c];
				else return t[a][b][c] = w(a, b, c - 1) + w(a, b - 1, c - 1) - w(a, b - 1, c);
			}
		}
	}
	if (t[a - 1][b][c]) {
		if (t[a - 1][b - 1][c]) {
			if (t[a - 1][b][c - 1]) {
				if (t[a - 1][b - 1][c - 1]) {
					return t[a][b][c] = t[a - 1][b][c] + t[a - 1][b - 1][c] + t[a - 1][b][c - 1] - t[a - 1][b - 1][c - 1];
				}
				else {
					return t[a][b][c] = t[a - 1][b][c] + t[a - 1][b - 1][c] + t[a - 1][b][c - 1] - w(a - 1, b - 1, c - 1);
				}
			}
			else {
				if (t[a - 1][b - 1][c - 1]) {
					return t[a][b][c] = t[a - 1][b][c] + t[a - 1][b - 1][c] + w(a - 1, b, c - 1) - t[a - 1][b - 1][c - 1];
				}
				else {
					return t[a][b][c] = t[a - 1][b][c] + t[a - 1][b - 1][c] + w(a - 1, b, c - 1) - w(a - 1, b - 1, c - 1);
				}
			}
		}
		else {
			if (t[a - 1][b][c - 1]) {
				if (t[a - 1][b - 1][c - 1]) {
					return t[a][b][c] = t[a - 1][b][c] + w(a - 1, b - 1, c) + t[a - 1][b][c - 1] - t[a - 1][b - 1][c - 1];
				}
				else {
					return t[a][b][c] = t[a - 1][b][c] + w(a - 1, b - 1, c) + t[a - 1][b][c - 1] - w(a - 1, b - 1, c - 1);
				}
			}
			else {
				if (t[a - 1][b - 1][c - 1]) {
					return t[a][b][c] = t[a - 1][b][c] + w(a - 1, b - 1, c) + w(a - 1, b, c - 1) - t[a - 1][b - 1][c - 1];
				}
				else {
					return t[a][b][c] = t[a - 1][b][c] + w(a - 1, b - 1, c) + w(a - 1, b, c - 1) - w(a - 1, b - 1, c - 1);
				}
			}
		}
	}
	else {
		if (t[a - 1][b - 1][c]) {
			if (t[a - 1][b][c - 1]) {
				if (t[a - 1][b - 1][c - 1]) {
					return t[a][b][c] = w(a - 1, b, c) + t[a - 1][b - 1][c] + t[a - 1][b][c - 1] - t[a - 1][b - 1][c - 1];
				}
				else {
					return t[a][b][c] = w(a - 1, b, c) + t[a - 1][b - 1][c] + t[a - 1][b][c - 1] - w(a - 1, b - 1, c - 1);
				}
			}
			else {
				if (t[a - 1][b - 1][c - 1]) {
					return t[a][b][c] = w(a - 1, b, c) + t[a - 1][b - 1][c] + w(a - 1, b, c - 1) - t[a - 1][b - 1][c - 1];
				}
				else {
					return t[a][b][c] = w(a - 1, b, c) + t[a - 1][b - 1][c] + w(a - 1, b, c - 1) - w(a - 1, b - 1, c - 1);
				}
			}
		}
		else {
			if (t[a - 1][b][c - 1]) {
				if (t[a - 1][b - 1][c - 1]) {
					return t[a][b][c] = w(a - 1, b, c) + w(a - 1, b - 1, c) + t[a - 1][b][c - 1] - t[a - 1][b - 1][c - 1];
				}
				else {
					return t[a][b][c] = w(a - 1, b, c) + w(a - 1, b - 1, c) + t[a - 1][b][c - 1] - w(a - 1, b - 1, c - 1);
				}
			}
			else {
				if (t[a - 1][b - 1][c - 1]) {
					return t[a][b][c] = w(a - 1, b, c) + w(a - 1, b - 1, c) + w(a - 1, b, c - 1) - t[a - 1][b - 1][c - 1];
				}
				else {
					return t[a][b][c] = w(a - 1, b, c) + w(a - 1, b - 1, c) + w(a - 1, b, c - 1) - w(a - 1, b - 1, c - 1);
				}
			}
		}
	}
}
*/
